module top_module( 
    input [99:0] a, b,
    input cin,
    output cout,
    output [99:0] sum );
	
	wire [99:0] c;
	assign sum[0] = a[0]^b[0]^cin;
	assign c[0] = a[0]&b[0]|cin&b[0]|cin&a[0];
    always @(*) begin
		integer i;
		for(i=1;i<100;i=i+1)begin
			sum[i] = a[i]^b[i]^c[i-1];
			c[i]=a[i]&b[i]|c[i-1]&b[i]|c[i-1]&a[i];
		end
	end
	assign cout = c[99];
endmodule
